package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.RestaurantBalanceDetail;
import com.ruoyi.system.mapper.RestaurantBalanceDetailMapper;
import com.ruoyi.system.service.RestaurantBalanceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: ruohao
 * @Date: 2023/9/11
 **/
@Service
public class RestaurantBalanceServiceImpl implements RestaurantBalanceService {
    @Resource
    private RestaurantBalanceDetailMapper restaurantBalanceDetailMapper;

    @Override
    public List<RestaurantBalanceDetail> selectList(RestaurantBalanceDetail restaurantBalanceDetail) {
        return restaurantBalanceDetailMapper.selectRestaurantBalanceDetailList(restaurantBalanceDetail);
    }

    @Override
    public RestaurantBalanceDetail selectById(Long id) {
        return restaurantBalanceDetailMapper.selectRestaurantBalanceDetailById(id);
    }

    @Override
    public Boolean create(RestaurantBalanceDetail restaurantBalanceDetail) {
        return restaurantBalanceDetailMapper.insertRestaurantBalanceDetail(restaurantBalanceDetail) == 1;
    }

    @Override
    public Boolean update(RestaurantBalanceDetail restaurantBalanceDetail) {
        return restaurantBalanceDetailMapper.update(restaurantBalanceDetail) == 1;
    }
}
